<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="roles" value="${sessionScope.user.roles}"/>
<div class="col-md-3">
	<h1>共享空间</h1><input id="paramsp" type="hidden"/>
	<div id="ajaxTree" class="demo"></div>
</div>
<div class="col-md-9">
	<c:forEach var="ro" items="${roles}">
		<c:forEach var="fu" items="${ro.functionAll}">
			<c:if test="${fu.code=='document-upload'}">
				<div class="row">
					<form id="uploadForm" class="form-horizontal">
						<input id="uploadParentId" name="parentId" type="hidden"/>
						<div>
							<label>文件:</label>
							<input name="uploadFile" type="file" id="uploadFile">
							<label>上传到:<span id="localtion"></span></label>
						</div>
						<label>名称:</label><input id="uploadName" name="name" type="text" />
						<label>描述:</label><input id="uploadDescription" name="description" type="text"/>
						<button id="uploadBtn" type="button" class="btn btn-primary">上传</button>
					 </form>
				 </div>
			</c:if>
		</c:forEach>
	</c:forEach>
	
	<div class="row">
		<table id="fileTable" class="table table-striped table-bordered">
			<thead>
				<tr>
					<th>名称</th>
					<th>描述</th>
					<th>路径</th>
					<th>类型</th>
					<th>创建者</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody></tbody>
		</table>
	</div>
	<div class="row">
			<!-- modal start -->
			<div id="addFolderPanel" class="modal fade" tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">添加文件夹</h4>
						</div>
						<div class="modal-body">
							<form id="addFolderForm" class="form-horizontal">
								<div class="form-group">
									<label class="col-sm-2 control-label">名称</label>
									<div class="col-sm-6">
										<input type="hidden" name="parentId" id="addFolderFormParentId" />
										<input class="form-control" name="name" id="documentName">
									</div>
									<label class="col-sm-4" style="color:red"></label>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">描述</label>
									<div class="col-sm-6">
										<input class="form-control" name="description" id="documentDescription">
									</div>
									<label class="col-sm-4" style="color:red"></label>
								</div>
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
							<button id="btnAdd" type="button" class="btn btn-primary">添加</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>
			<!-- /.modal -->
		</div>
</div>